package com.tj.collection.service.dto;

import com.fqgj.common.api.ResponseData;
import org.apache.commons.lang.StringUtils;


public class DeviceCallVO implements ResponseData {

    /**
     * 称谓
     */
    private String name;
    /**
     * 手机号码
     */
    private String phone;
    /**
     * 通话类型
     */
    private String callType;
    /**
     * 通话时间
     */
    private String callTime;

    private String callTimeStr;

    /**
     * 通话时长
     */
    private String callDuration;

    public String getCallTimeStr() {
        return callTimeStr;
    }

    public void setCallTimeStr(String callTimeStr) {
        this.callTimeStr = callTimeStr;
    }

    public String getName() {
        return name;
    }

    public DeviceCallVO setName(String name) {
        this.name = name;
        return this;
    }

    public String getPhone() {
        return phone;
    }

    public DeviceCallVO setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public String getCallType() {
        return callType;
    }

    public DeviceCallVO setCallType(String callType) {
        this.callType = callType;
        return this;
    }

    public String getCallTime() {
        return callTime;
    }

    public DeviceCallVO setCallTime(String callTime) {
        this.callTime = callTime;
        return this;
    }

    public String getCallDuration() {
        return callDuration;
    }

    public DeviceCallVO setCallDuration(String callDuration) {
        this.callDuration = callDuration;
        return this;
    }

    /**
     * 是否信息完整
     */
    public boolean isComplete() {
        return
                StringUtils.isNotBlank(phone)
                        && StringUtils.isNotBlank(callType)
                        //暂时不考虑挂断情况
                        && ("呼入".equals(callType) || "呼出".equals(callType))
                        && StringUtils.isNotBlank(callTime)
                        && StringUtils.isNotBlank(callDuration);
    }

}
